package com.gooboot.kadmin.admin;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import javax.annotation.PostConstruct;
import java.util.TimeZone;

@SpringBootApplication
@EnableSwagger2
@ComponentScan(basePackages = {
        "com.gooboot.kadmin.admin.restapi",
        "com.gooboot.kadmin.admin.config"
})
@MapperScan("com.gooboot.kadmin.admin.mapper")
public class KadminAdminApplication {

    public static void main(String[] args) {
        System.out.println("hello admin");
        SpringApplication.run(KadminAdminApplication.class, args);
    }

    /**
     * 设置默认时区
     */
    @PostConstruct
    void setDefaultTimezone() {
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
    }
}
